const logger = () => async (ctx,next) => {
    const startTime = Date.now();
    console.log(`start---------: 
        url: ${ctx.request.path};
        method:${ctx.method}
    `)
    await next()
    const endTime = Date.now();
    console.log(`end-----------: 
        url: ${ctx.request.path};
        method:${ctx.method}
    `)
    console.log(`${ctx.request.path}------times：${endTime - startTime}ms`)
}

module.exports = logger;